package org.itboys.product.entity;

import java.util.List;
import java.util.Map;

import org.itboys.mongodb.entity.BaseLongIdEntity;

import org.mongodb.morphia.annotations.Entity;
import org.mongodb.morphia.annotations.Indexed;

/**
 * 建材商品基本对象
 * @author ChenJh
 *
 */
@Entity(value = "Product", noClassnameStored = true)
public class Product extends BaseLongIdEntity{
 
	private static final long serialVersionUID = -4588556764426163453L;
	
	private String name;//商品名称
	@Indexed
	private Long sellerId = 0L;//为0 是自运营的 否则为给卖家运营的
	private int status;//状态 1:待平台审核  2:上架 3:下架 4:废弃 5:永久删除 其他状态自己定
	@Indexed
	private Long categoryId;//分类ID
	@Indexed
	private Long brandId;//品牌ID
	private int proPrice;//划掉的原价  以分为单位
	private int price;//实际交易的现价  以分为单位

	private Long productStore;//库存
	private int powerBean;//能量豆
	private String image;//如果是等比例的主图片 用这个 否则用 imageMap
	private List<String> images;//多图
	private int scale;//提成比例
	 /**
	  * 各种单图的map key 为图片类型 自己定义常量
	  * 比如 0:app主图 1:微信主图 2:列表横图 等待 自己去定义
	  * 如果UI设计的好的话 可以改成一个图片 就是这个图 在个个页面上 长宽比都一样
	  */
	private Map<Integer,String> imageMap;
	@Indexed
	private List<String> tags; //方便搜索的搜索标签
	private String barcode;//商品二维码barcode
	private String skuId;//商品的SKUID 商品的自定义编号

	private Integer isDeleted = 0;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Long getSellerId() {
		return sellerId;
	}

	public void setSellerId(Long sellerId) {
		this.sellerId = sellerId;
	}

	public int getStatus() {
		return status;
	}

	public void setStatus(int status) {
		this.status = status;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getBrandId() {
		return brandId;
	}

	public void setBrandId(Long brandId) {
		this.brandId = brandId;
	}

	public int getProPrice() {
		return proPrice ;
	}

	public void setProPrice(int proPrice) {
		this.proPrice = proPrice;
	}

	public int getPrice() {
		return price;
	}

	public void setPrice(int price) {
		this.price = price;
	}

	public String getImage() {
		return image;
	}

	public void setImage(String image) {
		this.image = image;
	}

	public Map<Integer, String> getImageMap() {
		return imageMap;
	}

	public void setImageMap(Map<Integer, String> imageMap) {
		this.imageMap = imageMap;
	}

	public List<String> getTags() {
		return tags;
	}

	public void setTags(List<String> tags) {
		this.tags = tags;
	}

	public String getBarcode() {
		return barcode;
	}

	public void setBarcode(String barcode) {
		this.barcode = barcode;
	}

	public String getSkuId() {
		return skuId;
	}

	public void setSkuId(String skuId) {
		this.skuId = skuId;
	}

	public Long getProductStore() {
		return productStore;
	}

	public void setProductStore(Long productStore) {
		this.productStore = productStore;
	}

	public List<String> getImages() {
		return images;
	}

	public void setImages(List<String> images) {
		this.images = images;
	}

	public Integer getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(Integer isDeleted) {
		this.isDeleted = isDeleted;
	}

	public int getPowerBean() {
		return powerBean;
	}

	public void setPowerBean(int powerBean) {
		this.powerBean = powerBean;
	}

	public int getScale() {
		return scale;
	}

	public void setScale(int scale) {
		this.scale = scale;
	}
}
